﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PromoCodes_Models.Entities;

namespace PromoCodes_Models.Concrete
{
    public static class PromotionCodeMockDatabase
    {
        private static List<Product> Products { get; set; }

        public static List<Product> GetProducts()
        {
            if (Products == null)
                Products = new List<Product>();
            return Products;
        }

        public static int AddProduct(Product product)
        {
            if(Products == null)
                Products = new List<Product>();
            Products.Add(product);
            return Products.IndexOf(product);
        }

        public static void DeleteProduct(Product product)
        {
            if (Products != null)
                Products.Remove(product);
        }
    }
}
